<template>
	<view class="home">
		<u-parse :content="data.content"></u-parse>
	</view>
</template>
<script setup>
	import {
		onMounted,
		ref
	} from "vue";
import { configlist } from "../../config/api";
	const data = ref({
		content: ''
	});
	const props = defineProps({
		title: {
			type: String,
			default: ''
		}
	})
	const userConfig = ref({})
	onMounted(() => {
		_configlist()

	})
	// 系统配置
	const _configlist = () => {
		configlist().then(res => {
			userConfig.value = res.data
			if(props.title == '隐私政策') data.value.content = userConfig.value.yinsi
			else data.value.content = userConfig.value.agreement
			console.log(data)
		})
	}
	uni.setNavigationBarTitle({
		title: props.title
	})
</script>
<style scoped lang="scss">
	.home {
		min-height: 100vh;
		padding: 30rpx;
	}
</style>